﻿using EOM.TSHotelManagement.Application;
using EOM.TSHotelManagement.Common.Contract;
using Microsoft.AspNetCore.Mvc;

namespace EOM.TSHotelManagement.WebApi.Controllers
{
    public class DashboardController : ControllerBase
    {
        private readonly IDashboardService dashboardService;

        public DashboardController(IDashboardService dashboardService)
        {
            this.dashboardService = dashboardService;
        }

        /// <summary>
        /// 获取房间统计信息
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public RoomStatisticsOutputDto RoomStatistics()
        {
            return dashboardService.RoomStatistics();
        }

        /// <summary>
        /// 获取业务统计信息
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public BusinessStatisticsOutputDto BusinessStatistics()
        {
            return dashboardService.BusinessStatistics();
        }

        /// <summary>
        /// 获取后勤统计信息
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public LogisticsDataOutputDto LogisticsStatistics()
        {
            return dashboardService.LogisticsStatistics();
        }

        /// <summary>
        /// 获取人事统计信息
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public HumanResourcesOutputDto HumanResourcesStatistics()
        {
            return dashboardService.HumanResourcesStatistics();
        }
    }
}
